<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>useBean</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
     useBean:   Book</br>
     id:实例名称<br/>
     class：bean的名称<br/>
     scope：作用域<br/><br/>
     <jsp:useBean id="book" class="bean.Book" scope="page"></jsp:useBean>
     
     setProperty 给book设置name为千年智慧书，时间为1800年<br/>
     name：实例名称
     <jsp:setProperty property="name" name="book" value="千年智慧书"/>
     <jsp:setProperty property="date" name="book" value="1800年"/> 
     <br/><br/>    
     
     getProperty 获得属性</br>
     <jsp:getProperty property="name" name="book"/><br/>
     <jsp:getProperty property="date" name="book"/>
     
  </body>
</html>
